<?php


/*
* Copyright (c) 2008-2016 vip.com, All Rights Reserved.
*
* Powered by com.vip.osp.osp-idlc-2.5.11.
*
*/

namespace com\vip\xstore\wop\inner\wm\service;

class PoReportQueryModel {
	
	static $_TSPEC;
	public $queryType = null;
	public $warehouseCode = null;
	public $clientPoNo = null;
	public $itemCode = null;
	public $brandCode = null;
	public $status = null;
	public $createDateFrom = null;
	public $createDateTo = null;
	public $warehousingTimeFrom = null;
	public $warehousingTimeTo = null;
	public $vendorCode = null;
	public $boxFlag = null;
	public $isBatchStorage = null;
	public $operTime = null;
	public $storageStatus = null;
	public $transactionSource = null;
	
	public function __construct($vals=null){
		
		if (!isset(self::$_TSPEC)){
			
			self::$_TSPEC = array(
			1 => array(
			'var' => 'queryType'
			),
			2 => array(
			'var' => 'warehouseCode'
			),
			3 => array(
			'var' => 'clientPoNo'
			),
			4 => array(
			'var' => 'itemCode'
			),
			5 => array(
			'var' => 'brandCode'
			),
			6 => array(
			'var' => 'status'
			),
			7 => array(
			'var' => 'createDateFrom'
			),
			8 => array(
			'var' => 'createDateTo'
			),
			9 => array(
			'var' => 'warehousingTimeFrom'
			),
			10 => array(
			'var' => 'warehousingTimeTo'
			),
			11 => array(
			'var' => 'vendorCode'
			),
			12 => array(
			'var' => 'boxFlag'
			),
			13 => array(
			'var' => 'isBatchStorage'
			),
			14 => array(
			'var' => 'operTime'
			),
			15 => array(
			'var' => 'storageStatus'
			),
			16 => array(
			'var' => 'transactionSource'
			),
			
			);
			
		}
		
		if (is_array($vals)){
			
			
			if (isset($vals['queryType'])){
				
				$this->queryType = $vals['queryType'];
			}
			
			
			if (isset($vals['warehouseCode'])){
				
				$this->warehouseCode = $vals['warehouseCode'];
			}
			
			
			if (isset($vals['clientPoNo'])){
				
				$this->clientPoNo = $vals['clientPoNo'];
			}
			
			
			if (isset($vals['itemCode'])){
				
				$this->itemCode = $vals['itemCode'];
			}
			
			
			if (isset($vals['brandCode'])){
				
				$this->brandCode = $vals['brandCode'];
			}
			
			
			if (isset($vals['status'])){
				
				$this->status = $vals['status'];
			}
			
			
			if (isset($vals['createDateFrom'])){
				
				$this->createDateFrom = $vals['createDateFrom'];
			}
			
			
			if (isset($vals['createDateTo'])){
				
				$this->createDateTo = $vals['createDateTo'];
			}
			
			
			if (isset($vals['warehousingTimeFrom'])){
				
				$this->warehousingTimeFrom = $vals['warehousingTimeFrom'];
			}
			
			
			if (isset($vals['warehousingTimeTo'])){
				
				$this->warehousingTimeTo = $vals['warehousingTimeTo'];
			}
			
			
			if (isset($vals['vendorCode'])){
				
				$this->vendorCode = $vals['vendorCode'];
			}
			
			
			if (isset($vals['boxFlag'])){
				
				$this->boxFlag = $vals['boxFlag'];
			}
			
			
			if (isset($vals['isBatchStorage'])){
				
				$this->isBatchStorage = $vals['isBatchStorage'];
			}
			
			
			if (isset($vals['operTime'])){
				
				$this->operTime = $vals['operTime'];
			}
			
			
			if (isset($vals['storageStatus'])){
				
				$this->storageStatus = $vals['storageStatus'];
			}
			
			
			if (isset($vals['transactionSource'])){
				
				$this->transactionSource = $vals['transactionSource'];
			}
			
			
		}
		
	}
	
	
	public function getName(){
		
		return 'PoReportQueryModel';
	}
	
	public function read($input){
		
		$input->readStructBegin();
		while(true){
			
			$schemeField = $input->readFieldBegin();
			if ($schemeField == null) break;
			$needSkip = true;
			
			
			if ("queryType" == $schemeField){
				
				$needSkip = false;
				$input->readByte($this->queryType); 
				
			}
			
			
			
			
			if ("warehouseCode" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->warehouseCode);
				
			}
			
			
			
			
			if ("clientPoNo" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->clientPoNo);
				
			}
			
			
			
			
			if ("itemCode" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->itemCode);
				
			}
			
			
			
			
			if ("brandCode" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->brandCode);
				
			}
			
			
			
			
			if ("status" == $schemeField){
				
				$needSkip = false;
				$input->readByte($this->status); 
				
			}
			
			
			
			
			if ("createDateFrom" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->createDateFrom);
				
			}
			
			
			
			
			if ("createDateTo" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->createDateTo);
				
			}
			
			
			
			
			if ("warehousingTimeFrom" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->warehousingTimeFrom);
				
			}
			
			
			
			
			if ("warehousingTimeTo" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->warehousingTimeTo);
				
			}
			
			
			
			
			if ("vendorCode" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->vendorCode);
				
			}
			
			
			
			
			if ("boxFlag" == $schemeField){
				
				$needSkip = false;
				$input->readByte($this->boxFlag); 
				
			}
			
			
			
			
			if ("isBatchStorage" == $schemeField){
				
				$needSkip = false;
				$input->readByte($this->isBatchStorage); 
				
			}
			
			
			
			
			if ("operTime" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->operTime); 
				
			}
			
			
			
			
			if ("storageStatus" == $schemeField){
				
				$needSkip = false;
				$input->readByte($this->storageStatus); 
				
			}
			
			
			
			
			if ("transactionSource" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->transactionSource);
				
			}
			
			
			
			if($needSkip){
				
				\Osp\Protocol\ProtocolUtil::skip($input);
			}
			
			$input->readFieldEnd();
		}
		
		$input->readStructEnd();
		
		
		
	}
	
	public function write($output){
		
		$xfer = 0;
		$xfer += $output->writeStructBegin();
		
		if($this->queryType !== null) {
			
			$xfer += $output->writeFieldBegin('queryType');
			$xfer += $output->writeByte($this->queryType);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->warehouseCode !== null) {
			
			$xfer += $output->writeFieldBegin('warehouseCode');
			$xfer += $output->writeString($this->warehouseCode);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->clientPoNo !== null) {
			
			$xfer += $output->writeFieldBegin('clientPoNo');
			$xfer += $output->writeString($this->clientPoNo);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->itemCode !== null) {
			
			$xfer += $output->writeFieldBegin('itemCode');
			$xfer += $output->writeString($this->itemCode);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->brandCode !== null) {
			
			$xfer += $output->writeFieldBegin('brandCode');
			$xfer += $output->writeString($this->brandCode);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->status !== null) {
			
			$xfer += $output->writeFieldBegin('status');
			$xfer += $output->writeByte($this->status);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->createDateFrom !== null) {
			
			$xfer += $output->writeFieldBegin('createDateFrom');
			$xfer += $output->writeI64($this->createDateFrom);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->createDateTo !== null) {
			
			$xfer += $output->writeFieldBegin('createDateTo');
			$xfer += $output->writeI64($this->createDateTo);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->warehousingTimeFrom !== null) {
			
			$xfer += $output->writeFieldBegin('warehousingTimeFrom');
			$xfer += $output->writeI64($this->warehousingTimeFrom);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->warehousingTimeTo !== null) {
			
			$xfer += $output->writeFieldBegin('warehousingTimeTo');
			$xfer += $output->writeI64($this->warehousingTimeTo);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->vendorCode !== null) {
			
			$xfer += $output->writeFieldBegin('vendorCode');
			$xfer += $output->writeString($this->vendorCode);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->boxFlag !== null) {
			
			$xfer += $output->writeFieldBegin('boxFlag');
			$xfer += $output->writeByte($this->boxFlag);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->isBatchStorage !== null) {
			
			$xfer += $output->writeFieldBegin('isBatchStorage');
			$xfer += $output->writeByte($this->isBatchStorage);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->operTime !== null) {
			
			$xfer += $output->writeFieldBegin('operTime');
			$xfer += $output->writeI64($this->operTime);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->storageStatus !== null) {
			
			$xfer += $output->writeFieldBegin('storageStatus');
			$xfer += $output->writeByte($this->storageStatus);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->transactionSource !== null) {
			
			$xfer += $output->writeFieldBegin('transactionSource');
			$xfer += $output->writeString($this->transactionSource);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		$xfer += $output->writeFieldStop();
		$xfer += $output->writeStructEnd();
		return $xfer;
	}
	
}

?>